import {ref} from 'vue'
import {defineStore} from 'pinia'
import {getCategory} from '@/apis/layout.js'

export const useCategoryStore = defineStore('category', () => {
        const categoryList = ref([])
        const getCategoryList = async () => {
                const res = await getCategory()
                categoryList.value = res.data.result
        }
        return {
                categoryList, getCategoryList
        }
})
